import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
		token:''
  },
  mutations: {
		setToken(state,data){
			state.token = data.token;
		}
  },
  actions: {
		setTokenStatus(context,data){
			//console.log(context)//vuex的实例化对象
			context.commit("setToken",data);
		}
  }
})
